# 装饰器
from flask import session
from flask import render_template
import functools
import hashlib

# 登录装饰器
def login_required(func):
    def wrapper(*args, **kwargs):
        if 'username' in session:
            
            return func(*args, **kwargs)
        else:
            return render_template('/session.html')

    return wrapper

